public class Base {
    public String name;
    private int age;
    protected int height;
    double weight;
    public Base(){
        System.out.println("Base类的无参构造器");
    }
    public Base(String name,int age,int height,double weight){
        this.name=name;
        this.age=age;
        this.height=height;
        this.weight=weight;
        System.out.println("姓名："+this.name+",年龄:"+age+",身高:"+this.height+",体重:"+this.weight);

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Base{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", height=" + height +
                ", weight=" + weight +
                '}';
    }
}
